﻿using ProTrack.Dto;
using ProTrack.Entity;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace ProTrack.IServices.Examine
{
    /// <summary>
    /// 来料检验单接口
    /// </summary>
    public interface IQcReceiveRecordServices
    {
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="model">数据模型</param>
        /// <param name="list">子项数据模型</param>
        /// <returns></returns>
        public Task<bool> AddAsync(QcReceiveRecord model, List<QcReceiveRecordItemDto> list);


        /// <summary>
        /// 查询所有数据
        /// </summary>
        /// <returns></returns>
        public Task<IEnumerable<QcReceiveRecord>> GetAllAsync();
        /// <summary>
        /// 分页获取
        /// </summary>
        /// <param name="PageIndex">当前页</param>
        /// <param name="PageSize">页大小</param>
        /// <param name="RecordCode">来料检验单编号</param>
        /// <param name="ItemName">商品名</param>
        /// <param name="Status">检验结果</param>
        /// <returns></returns>
        public Task<IEnumerable<QcReceiveRecord>> GetAsync(int PageIndex, int PageSize, string RecordCode, string ItemName, string Status);
        /// <summary>
        /// 获取总条数
        /// </summary>
        /// <param name="RecordCode">来料检验单编号</param>
        /// <param name="ItemName">商品名</param>
        /// <param name="Status">检验结果</param>
        /// <returns></returns>
        public Task<int> GetCountAsync(string RecordCode, string ItemName, string Status);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="model">数据模型</param>
        /// <param name="list">子项数据模型</param>
        /// <returns></returns>
        public Task<bool> UpdateAsync(QcReceiveRecord model, List<QcReceiveRecordItemDto> list);

        /// <summary>
        /// 批量删除
        /// </summary>
        /// <param name="Ids"></param>
        /// <returns></returns>
        public Task<bool> DeleteAsync(int[] Ids);
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public Task<bool> DeleteAsync(int Id);



        /// <summary>
        /// 获取到货通知单下的商品
        /// </summary>
        /// <param name="WareHouseInboundBillId">到货通知单Id</param>
        /// <returns></returns>
        public Task<IEnumerable<WareHouseInboundBillItemDto>> GetItemByWareHouseInboundBillId(string WareHouseInboundBillId);


        /// <summary>
        /// 根据商品Id获取来料检验标准
        /// </summary>
        /// <param name="ItemId">商品Id</param>
        /// <returns></returns>
        public Task<IEnumerable<QcReceiveStandardItem>> GetQcProcessStandardItemByItemId(string ItemId);



        /// <summary>
        /// 根据来料检验单Id获取来料检验单子项和缺陷记录明细
        /// </summary>
        /// <param name="QcReceiveRecordId">料检验单Id</param>
        /// <returns></returns>
        public Task<IEnumerable<QcReceiveRecordItemDto>> GetQcReceiveRecordItemDetailsByQcReceiveRecordId(string QcReceiveRecordId);


        /// <summary>
        /// 修改单据状态
        /// </summary>
        /// <param name="Id">单据Id</param>
        /// <param name="Status">状态：0待审核 1已审核</param>
        /// <returns></returns>
        public Task<bool> UpdateStatus(long id, int status);


    }
}
